Developer --> Technical Publications
PATHHardware Documentation > USB Devices > Mac OS USB DDK API Reference


USB Software Presence and Version Attributes

Applications can obtain information about the presence, version, and attributes of USB software on Macintosh computers by using the Gestalt Manager routines and USB gestalt selectors. The Gestalt Manager is defined in Inside Macintosh: Overview .

The gestaltUSBAttr, gestaltUSBPresent, gestaltUSBHasIsoch, and gestaltUSBVersionGestalt selectors are defined for Macintosh USB software as follows:

gestaltUSBAttr     = `usb `USB attributes
gestaltUSBPresent  = 0Bit 0 is set if USB software is present
gestaltUSBHasIsoch = 1Bit 1 is set is USB software supports
                     isochronous transfers
gestaltUSBVersion  = `usbv`USB version number

The gestaltUSBVersion selector returns the version of the USB software in a 32-bit format as follows:

MMmmRRss
MM
The most significant byte containing the major version number. The current value for the major version number is 1. This number will increment with each major release.

mm
The next byte contains the minor version number. The current value for the minor version number is 1.

RR
The next byte contains the release stage. The release stage is defined as: 0x02 = development, 0x04 = alpha, 0x06 = beta, and 0x08 = final. If the software was at the beta release stage, this number would be 0x06.

ss
The least significant byte is the sequence number of the release, and it changes with every build of the USB software.

© 1998 Apple Computer, Inc. – (Last Updated 23 Nov 98)

Previous | Back Up One Level | Next |